package com.ExcelServer.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.io.Serializable;

/**
 * 
 * @TableName excel_query_rules
 */
@Data
public class ExcelQueryRules implements Serializable {
    /**
     * 
     */
    @TableId(type= IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    private Integer tableId;

    /**
     * 
     */
    private String selectInfo;

    /**
     * 
     */
    private String groupInfo;

    /**
     * 
     */
    private String sort;

    private String note;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ExcelQueryRules other = (ExcelQueryRules) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTableId() == null ? other.getTableId() == null : this.getTableId().equals(other.getTableId()))
            && (this.getSelectInfo() == null ? other.getSelectInfo() == null : this.getSelectInfo().equals(other.getSelectInfo()))
            && (this.getGroupInfo() == null ? other.getGroupInfo() == null : this.getGroupInfo().equals(other.getGroupInfo()))
            && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()))
                && (this.getNote() == null ? other.getNote() == null : this.getNote().equals(other.getNote()))
                ;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTableId() == null) ? 0 : getTableId().hashCode());
        result = prime * result + ((getSelectInfo() == null) ? 0 : getSelectInfo().hashCode());
        result = prime * result + ((getGroupInfo() == null) ? 0 : getGroupInfo().hashCode());
        result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
        result = prime * result + ((getNote() == null) ? 0 : getNote().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", tableId=").append(tableId);
        sb.append(", selectInfo=").append(selectInfo);
        sb.append(", groupInfo=").append(groupInfo);
        sb.append(", sort=").append(sort);
        sb.append(", sort=").append(note);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}